package com.cesce.batch.cobros.validation;


import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springmodules.validation.valang.functions.AbstractFunction;
import org.springmodules.validation.valang.functions.Function;

import com.cesce.batch.cobros.reverse.Cobcomunicados;
import com.cesce.batch.cobros.reverse.Cobformatofechacobros;
import com.cesce.batch.cobros.reverse.Cobformatoimportes;
import com.cesce.batch.cobros.reverse.Cobparametros;
import com.cesce.batch.cobros.reverse.Cobregistro;


public class VerifExistCampos extends AbstractFunction {
	
		protected final Log logger = LogFactory.getLog(getClass());

	    public VerifExistCampos(Function[] arguments, int line, int column) {
	        super(arguments, line, column);
	        definedExactNumberOfArguments(3);
	    	}
	
	    
		@SuppressWarnings("unchecked")
		protected Object doGetResult(Object target) throws Exception {
			String spto= (String) getArguments()[0].getResult(target);
			String codigocesce= (String) getArguments()[1].getResult(target);
			String nif= (String) getArguments()[2].getResult(target);
			
			if (spto.length() != 0 || codigocesce.length() != 0 || nif.length() != 0 )
				return Boolean.TRUE;
			else
				return Boolean.FALSE;
			}	
		}
